layui.extend({
    selectN: '/layui_extends/selectN',
    selectM: '/layui_extends/selectM',
    baseConfig : "/js/pages/baseConfig"
}).use(['form','layer','laydate','table','laytpl','element','util','upload','selectN','selectM','baseConfig'],function(){

    var form = layui.form,
        layer = parent.layer === undefined ? layui.layer : top.layer,
        $ = layui.jquery,
        table = layui.table,
        upload = layui.upload,
        laydate = layui.laydate,
        selectN = layui.selectN,
        baseConfig = layui.baseConfig,
        selectM = layui.selectM;
    var util = layui.util;

    var tableIns = table.render({
        elem: '#list',
        url : '/recharge/listForEasyEuro/',
        text: { none: "Aucun résultat"},
        cellMinWidth : 95,
        height : "full",
        page: true, //开启分页
        limit : 20,
        limits : [20,50,70,100],
        totalRow : true, //开启合计行
        id : "listTable",
        cols : [[
            {field: 'dealTimeFrench', title: "DATE", align:"center", templet:function ( d) {
                    return baseConfig.formatDate( d.dealTimeFrench);
            }},
            {field: 'jobNumber', title: "Identifiant", align:"center", templet : function( d) {
                if( d.jobNumber){
                    return d.jobNumber;
                }else{
                    return "未找到员工";
                }
            }},
            {field: 'rechargeTypeName', title: "收款方式", align:"center"},
            {field: 'memo', title: "备注", align:"center"},
            {field: 'merchantOrderAmount', title: "Montant", align:"center", templet : function( d) {
                var integerV = d.merchantOrderAmount.toString().split(".")[0];
                var floatV = d.merchantOrderAmount.toString().split(".")[1];
                var profix = "";
                if( d.moneyStatus != "6"){
                    //前面加个时钟
             //       profix = "<img src='' class=''/> ";
                }
                var thouend = parseInt(integerV / 1000);
                var str = profix + ( thouend > 0 ? thouend : "") + " " + integerV%1000 + "," + floatV + " €";

                return "<div style='width: 40%;text-align: right;margin-right: 30%'>" + str + "</div>"
            }}
        ]],
        response : {
            statusCode: 200 //规定成功的状态码，默认：0
        },
        parseData : function( res){ //res 即为原始返回的数据
            return {
                "code": res.code, //解析接口状态
                "msg": res.msg, //解析提示文本
                "count": res.data.count, //数据条数
                "data": res.data.data //解析数据列表
            };
        }
    });
});
